import {
  SUBMIT,
  FETCH_USER,
  LOGIN,
  LOGIN_REQUEST,
  LOGIN_SUCCESS,
  LOGIN_FAILURE
} from "./actionTypes";

import makeActionCreator from "@utils/makeActionCreator";

export const submit = makeActionCreator(SUBMIT, "data");
export const login = makeActionCreator(LOGIN, "data");
export const loginRequest = makeActionCreator(LOGIN, "data");
export const loginSuccess = makeActionCreator(LOGIN_SUCCESS, "token");
export const loginFailure = makeActionCreator(LOGIN_FAILURE, "error");
export const fetchUser = makeActionCreator(FETCH_USER, "data");
